package cn.zyq.ykb.mapper.sys;


import cn.zyq.ykb.beans.sys.SysMenu;
import cn.zyq.ykb.system.config.common.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 菜单权限表
 * 2023-05-12 20:14:09
 */
@Component
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    List<SysMenu> list(Map<String, Object> param);

    List<SysMenu> selectMenuListByUserId(SysMenu menu);

    List<String> selectMenuPermsByUserId(Integer userId);

    List<String> selectMenuPermsByRoleId(Integer roleId);

    List<SysMenu> selectMenuTreeByUserId(Integer userId);


    List<Integer> selectMenuListByRoleId(@Param("roleId") Integer roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);

    int hasChildByMenuId(Integer menuId);

    SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Integer parentId);


    List<SysMenu> selectMenuTreeAll();

}
